package grm.info;

import java.util.ArrayList;

public class NormalGood implements IGood{
    int price;
    String name;
    public NormalGood(ArrayList<String> a) {
        price = Integer.parseInt(a.get(0));
        name = a.get(1);
    }
    public NormalGood(int price, String name) {
        this.price = price;
        this.name = name;
    }
    @Override
    public int getPrice() {
        return price;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return "NormalGood{" +
                "price=" + price +
                ", name='" + name + '\'' +
                '}';
    }
}
